<%@ page language="java" contentType="text/html; charset=utf-8"    pageEncoding="utf-8"%>
<%
   request.setAttribute("ctx", request.getContextPath());
%>
<!--  <script type="text/javascript" src="${ctx}/static/js/jquery-3.1.0.js"></script> -->
<link rel="stylesheet" type="text/css" href="${ctx}/static/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctx}/static/easyui/themes/icon.css">
<script type="text/javascript" src="${ctx}/static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="${ctx}/static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${ctx}/static/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
var _global_web_app_path="${ctx}";

//获取浏览器页面可见高度和宽度
var _PageHeight = document.documentElement.clientHeight,
  _PageWidth = document.documentElement.clientWidth;

//计算loading框距离顶部和左部的距离（loading框的宽度为215px，高度为61px）
var _LoadingTop = _PageHeight > 61 ? (_PageHeight - 61) / 2 : 0,
  _LoadingLeft = _PageWidth > 215 ? (_PageWidth - 215) / 2 : 0;

//加载gif地址
var Loadimagerul="${ctx}/static/easyui/loading.gif";

//在页面未加载完毕之前显示的loading Html自定义内容
var _LoadingHtml = '<div id="_loadingDiv" style="position:absolute;left:0;width:100%;height:' + _PageHeight + 'px;top:0;background:#f3f8ff;opacity:1;filter:alpha(opacity=80);z-index:10000;"><div style="position: absolute; cursor1: wait; left: ' + _LoadingLeft + 'px; top:' + _LoadingTop + 'px; width:100px;; height: 20px; line-height: 20px; padding-left: 50px; padding-right: 5px; background: #fff url('+Loadimagerul+') no-repeat scroll 5px 3px; border: 2px solid #95B8E7; color: #696969; font-family:\'Microsoft YaHei\'; font-size:12px;">加载中,请稍候...</div></div>';

//呈现loading效果
document.write(_LoadingHtml);

//监听加载状态改变
document.onreadystatechange = completeLoading;

//加载状态为complete时移除loading效果
function completeLoading() {
  if (document.readyState == "complete") {
      var loadingMask = document.getElementById('_loadingDiv');
      loadingMask.parentNode.removeChild(loadingMask);
  }
}
</script>